/*
	使用双重循环实现五子棋游戏棋盘的绘制， 棋盘界面的具体效果如下： 
*/

import java.util.Scanner;
import java.util.Random;
import java.util.Arrays;

public class job_5 {

	public static void main(String[] args) {

		String[] menu = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", 
		"a", "b", "c", "d", "e", "f"};

		// System.out.println(Arrays.toString(menu));
		for(int i = 0; i < menu.length+1; i++) {
			for(int j = 0; j < menu.length+1; j++) {
				if(i == 0 && j == 0) {
					System.out.print(" " + " ");
					continue;
				}
				if(i == 0) {
					System.out.print(menu[j-1] + " ");
					continue;
				}
				if(j == 0) {
					System.out.print(menu[i-1] + " ");
					continue;
				}
				System.out.print("+" + " ");
			}
			System.out.println();
		}
	}
}